/*
 * @Descripttion:
 * @Author: Silence
 * @Date: 2023-05-27 19:30:11
 * @LastEditors: Silence
 * @LastEditTime: 2023-05-28 11:13:37
 */
import Vue from 'vue'
import VueRouter from 'vue-router'
// import ItemBox from '../views/ItemBox.vue'
import HomeView from '../views/HomeView.vue'
import Login from '../components/Login.vue'
import Register from '../components/Register.vue'
import First from '../views/First.vue'
import Second from '../views/Second.vue'
import Third from '../views/Third.vue'
import Forth from '../views/Forth.vue'
import Monday from '../views/Monday.vue'
import Tuesday from '../views/Tuesday.vue'
import Wednesday from '../views/Wednesday.vue'
import NotFound from '../views/NotFound.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'home',
    component: HomeView,
    redirect: '/first',
    children: [
      {
        path: '/first',
        name: 'First',
        component: First,
        children: [
          {
            path: '/monday',
            name: 'Monday',
            component: Monday
          },
          {
            path: '/tuesday',
            name: 'Tuesday',
            component: Tuesday
          },
          {
            path: '/wednesday',
            name: 'Wednesday',
            component: Wednesday
          },
        ]
      },
      {
        path: '/second',
        name: 'Second',
        component: Second
      },
      {
        path: '/third/:id',
        name: 'Third',
        component: Third
      },
      {
        path: '/forth/:id',
        name: 'Forth',
        component: Forth
      }
    ]
  },
  {
    path: '/login',
    name: 'Login',
    component: Login
  },
  {
    path: '/register',
    name: 'Register',
    component: Register
  },
  {
    path: '*',
    name: 'NotFound',
    component: NotFound
  }
]

const router = new VueRouter({
  routes
})

export default router
